<?php
session_start();
if(isset($_SESSION['admin_id'])) {
    include "../include/dbFunctions.phpdent'";
    if(isset($_POST['id_student'])) {
        $id_student=$_POST['id_student'];
        $arr_num=count($id_student);
        $i=0;
        while ($i < $arr_num) {
            $uQuery= "DELETE FROM student
        WHERE student_id=$id_student[$i]";
            $uResult = executeQuery($uQuery);
            $i++;
        }
    }
    if (($uResult!=0)) {
        $_SESSION['mes']="The students have been deleted sucessfully";
        header("Location: studentManage.php");
    }
    ?>
    <?php
}else {
    header("Location: ../include/login.html");
}
?>